-- GENERATED SPELL FOR [Moonrage Elder] --


function spell0_1896(pUnit, Event) --@Lesser Heal,Heal--
pUnit:FullCastSpellOnTarget(2053,pUnit)
pUnit:RegisterEvent('Sorts_1896', 2500, 1)
end

function spell1_1896(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(594,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1896', 18000, 1)
end

function spell2_1896(pUnit, Event) --@Transformation,Self--
pUnit:FullCastSpellOnTarget(7671,pUnit)
pUnit:RegisterEvent('Sorts_1896', 581, 1)
end

function Sorts_1896(pUnit, Event)
local choix_sorts_1896 = math.random(0, 2)
if choix_sorts_1896 == 0 then
pUnit:RegisterEvent('spell0_1896', 1, 1)
end
if choix_sorts_1896 == 1 then
pUnit:RegisterEvent('spell1_1896', 1, 1)
end
if choix_sorts_1896 == 2 then
pUnit:RegisterEvent('spell2_1896', 1, 1)
end
end

function mob1896_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1896', math.random(1500, 3000), 1)
end

function mob1896_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1896_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1896_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1896, 1, 'mob1896_Action')
RegisterUnitEvent(1896, 2, 'mob1896_Leave')
RegisterUnitEvent(1896, 3, 'mob1896_Kill')
RegisterUnitEvent(1896, 4, 'mob1896_Die')
